package com.ufgov.smartclient.component.table;

import java.util.prefs.Preferences;

public class DefaultPreferenceStore implements PreferenceStore {

  @Override
  public byte[] load(String key) {
    Preferences prefs = Preferences.userNodeForPackage(getClass());
    byte[] data = prefs.getByteArray(key, null);
    return data;
  }

  @Override
  public void save(String key, byte[] data) {
    Preferences prefs = Preferences.userNodeForPackage(getClass());
    prefs.putByteArray(key, data);
  }

}
